package cn.hwadee.muying.mapper;

import cn.hwadee.muying.entity.Contract;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;
import cn.hwadee.muying.entity.User;
import cn.hwadee.muying.commons.page.MyPage;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 服务合同 Mapper 接口
 * </p>
 *
 * @author Mankind
 * @since 2018-08-06
 */
@Mapper
@Component(value = "contractMapper")
public interface ContractMapper extends BaseMapper<Contract> {

    List<Contract> list(@Param("page") MyPage<Contract> page, @Param("cUser") User cUser, @Param("userId") Long userId, @Param("nurseryTeacherId") Long nurseryTeacherId, @Param("nurseryConsultantId") Long nurseryConsultantId, @Param("startDate") Date startDate, @Param("endDate")Date endDate, @Param("status") Long status, @Param("keyword") String keyword) throws Exception;

    void finishContract(@Param("conId") Long conId) throws Exception;

    List<User> selectReturnVisitList(@Param("orgId") Long orgId,@Param("rid") Long rid);
}
